//
//  BYHotContentHeardView.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/21.
//  Copyright © 2018年 WisdomLijiang. All rights reserved.
//已废弃

#import "BYHotContentHeardView.h"

@implementation BYHotContentHeardView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        [self addView];
        self.contentView.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

-(void)addView{
    [self.contentView addSubview:self.imageView];
    [self.contentView addSubview:self.contentLabel];
    [self.contentView addSubview:self.BottomView];
    [self.BottomView addSubview:self.titleLabel];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left);
        make.top.mas_equalTo(self.mas_top);
        make.size.mas_equalTo(CGSizeMake(KSCREEWIDTH, 184));
    }];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(12);
        make.right.mas_equalTo(self.mas_right).offset(-12);
        make.top.mas_equalTo(self.imageView.mas_bottom).offset(18);
    }];
    [self.BottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left);
        make.right.mas_equalTo(self.mas_right);
        make.top.mas_equalTo(self.contentLabel.mas_bottom).offset(22);
        make.height.mas_equalTo(@20);

    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(12);
        make.centerY.mas_equalTo(self.BottomView.mas_centerY);
    }];
}

-(UIImageView *)imageView{
    if (!_imageView) {
        _imageView  = [[UIImageView alloc]init];
    }
    return _imageView;
}
-(UILabel *)contentLabel{
    if (!_contentLabel) {
        _contentLabel =  [[UILabel alloc]init];
        _contentLabel.font = H17;
        _contentLabel.textColor = RGBA(40, 40, 40, 1);
        _contentLabel.numberOfLines = 0;
        [_contentLabel sizeToFit];
    }
    return _contentLabel;
}
-(UIView *)BottomView{
    if (!_BottomView) {
        _BottomView  =[[UIView alloc]init];
        _BottomView.backgroundColor = RGBA(152, 152, 152, 1);
    }
    return _BottomView;
}
-(UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.font = H12;
        _titleLabel.text = @"评论";
        _titleLabel.textColor = RGBA(40, 40, 40, 1);

    }
    return _titleLabel;
}
@end
